﻿using NearAop.Interfaces;
using System;
using System.Collections.Generic;

namespace NearAop
{
    /// <summary>
    /// 接口代理
    /// </summary>
    [AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
    public sealed class AddProxyInterfaceAttribute : Attribute, IAopProxyInterface
    {
        /// <summary>
        /// 接口代理
        /// </summary>
        /// <param name="targetTypes">目标类型</param>
        /// <param name="proxyType">代理类型</param>
        public AddProxyInterfaceAttribute(Type proxyType, params Type[] targetTypes)
        {
            ProxyType = proxyType;
            TargetTypes = targetTypes;
        }


        /// <summary>
        /// 代理类型
        /// </summary>
        public Type ProxyType { get; }

        public IEnumerable<Type> TargetTypes { get; } = new Type[] { };
    }
}
